% ScanSystem
\documentclass{report}
\usepackage{graphicx,amssymb,amstext,amsmath,amsthm,caption,hyperref,mathtools}
\usepackage[T1]{fontenc}
\hypersetup{
 colorlinks,%
 citecolor=blue,%
 filecolor=blue,%
 linkcolor=blue,%
 urlcolor=blue
}
\newcommand\Quote[1]{\lq\textsl{#1}\rq}
\newcommand\fr[2]{{\textstyle\frac{#1}{#2}}}
\begin{document}
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{.125in}
\setlength{\textwidth}{6.25in}
\begin{document}
\title{Processing System\\Version 1.0 Beta}
\author{YCOA}
\renewcommand{\today}{Mac Radigan\\February 23, 2010\\Revision 0.3}
\maketitle
%-----------------------------------------------------------
\begin{abstract}\centering
This document describes the operation of the Processing System, with an emphasis on the YCOA Scan System.
\end{abstract}
%-----------------------------------------------------------
\tableofcontents

%-----------------------------------------------------------
\section{Concept Of Operations}

%-----------------------------------------------------------
\section{Algorithms}
\subsection{Template Selection}
\section{Metrics}
\subsubsection{Entropy $H_e\left(A\right)$}
Entropy, $H_e\left(A\right)$, is a measure of the of the information in a dataset with symbol alphabet $A$, measured in nats.  We may aslo specify the measure in bits, to quantify the Cram\'{e}r-Rao lower bound (CRLB) on the compression rate of the dataset.  Template selection is performed by applying the template results with the highest entropy.  Since the symbol alphabet is challenging to enumerate, and their probabilities extremely challenging to observe, an approximatation to the entropy can be produced by assigning a synthetic probability distribution to a given approximate alphabet.
\par
We may approximate the sybol alphabet with the set $A = \{[A-z0-9 \backslash-]\{1,9\}\}$.  To synthesize the probability distribution, partition the set $A$ into a typical set $A_\epsilon = \{[01]|TRUE|FALSE|ERROR\}$, and an atypical set $A_a = A \backslash A_\epsilon$.  By way of the Asymptotic Equipartition Property (AEP), a typical set would have order $\mid A_\epsilon \mid \le 2^{n H_e\left(A\right)+\epsilon}$ and probability $Pr\{A_\epsilon\} > 1-\epsilon$.  We violate the assumption and assign a typical probability of $Pr\{A_\epsilon\} = 0.8$.  To construct a synthetic probability distribution function, assume uniform probability of symbols within each partition.
\par
\par
\subsubsection{Uniformity $\sigma{_x}$}
\subsubsection{Greed}

%-----------------------------------------------------------
\section{Processor}
\subsection{Installation}
\subsection{Configuration}
\subsubsection{Environment}
  \begin{itemize}
    \item \fontbf{SYSTEM\_HOME} - root directory of Processing System installation
    \item \fontbf{COMPUTERNAME} - name of host machine
  \end{itemize}
\subsubsection{Configuration Files}
  \begin{itemize}
    \item \fontbf{config/system.conf} - core system settings
    \item \fontbf{config/ycoa.conf} - market configuration settings
    \item \fontbf{config/scan.conf} - scanner configuration settings
    \item \fontbf{config/logging.properties} - logging configuration file
  \end{itemize}
\subsection{Interfaces}
\subsubsection{Command Line Inteface}
\subsubsection{Running As A Windows Service}
\subsubsection{OSGi Interface}
\subsubsection{Processor Shell}
\subsubsection{Scripting Interface}
\subsubsection{Java API}
%-----------------------------------------------------------
\section{Modules}
\subsection{Scan}
\subsubsection{Scanners}
  \begin{itemize}
    \item \fontbf{modules/scan/scanners/SigninScanner.icr} - signin scanner
    \item \fontbf{modules/scan/scanners/BarcodeScanner.icr} -  barcode scanner
    \item \fontbf{modules/scan/scanners/DiagnoticScanner.icr} - scanner to assist with debugging and diagnostics
    \item \fontbf{modules/scan/scanners/DefaultScanner.icr} - default scanner sends unprocessed images to Lost And Found
  \end{itemize}
\subsubsection{Templates}
  \begin{itemize}
    \item \fontbf{modules/scan/templates/barcodesheetn.omr} - 
    \item \fontbf{modules/scan/templates/signin-1.omr} - 
    \item \fontbf{modules/scan/templates/signin-1old.omr} - 
    \item \fontbf{modules/scan/templates/signin-scaled1.omr} - 
    \item \fontbf{modules/scan/templates/signin-scaled2.omr} - 
  \end{itemize}
\subsubsection{Reports}
  \begin{itemize}
    \item \fontbf{modules/scan/reports/SigninReport.rpt} - signin report template
    \item \fontbf{modules/scan/reports/BarcodeReport.rpt} - barcode report template
  \end{itemize}
%-----------------------------------------------------------
\section{Log Viewer}
\subsection{Trusted Client}
\subsection{Broadcast Client}
%-----------------------------------------------------------
\section{Database Schema}
\subsection{Tables}
\subsubsection{File Location Table [yyFiles]}
  \par
  \textbf{yyFiles}
  \\
  \par
  integer identity(1,1) \textbf{fiId} - primary key
  \par
  varchar(100) \textbf{fiHashcode} - MD5 cryptographic hashcode of file contents
  \par
  varchar(2000) \textbf{fiPath} - relative path to file from \textit{DATAOUT}/\textit{MARKET}
  \par
  integer \textbf{fiReprocessed} - number of times file was reprocessed
  \par
  varchar(10) \textbf{fiFormat} - type of file ('tif'|'pdf'|'xml'|'txt')
  \par
  varchar(20) \textbf{fiType} - type of file ('Image'|'Gravic'|'Report')
  \par
  varchar(20) \textbf{fiSystem} - name of system ('Signin'|'Barcode')
  \par
  integer \textbf{fiKey} - primary, system-dependent foreign key; Signin:[ClassReport].[cpId]
  \par
  integer \textbf{fiIndex} - secondary, system-dependent foreign key; Signin:[ClsStudent].[clId]
  \par
  bit \textbf{fiActive} - indicates record is available for query
  \par
  smalldatetime \textbf{fiLastModDate} - date record was last updated
  \par
  varchar(4) \textbf{fiLastModBy} - user which last updated record

\subsection{Stored Procedures}

\subsubsection{Updating Class Roster [yy\_scan\_UpdateClassRoster\_Diagnostics]}
\par
\begin{algorithmic}
  \Function{yy\_scan\_UpdateClassRoster\_Diagnostics}{...}
  \EndFunction
\end{algorithmic}

\subsubsection{Updating Class Roster [yy\_scan\_MakeupClassRoster]}
\par
\begin{algorithmic}
  \Function{yy\_scan\_MakeupClassRoster}{...}
  \EndFunction
\end{algorithmic}

\subsubsection{Adding File Locations [yy\_scan\_AddFile]}
\par
\begin{algorithmic}
  \Function{yy\_scan\_AddFile}{...}
  \EndFunction
\end{algorithmic}

\subsubsection{Retrieving File Locations [yy\_scan\_GetFile]}
\par
\begin{algorithmic}
  \Function{yy\_scan\_GetFile}{varchar(20) Format, varchar(10) Type, varchar(20) System, integer Key, integer Index}
  \EndFunction
\end{algorithmic}
  \par
  \\
  WHERE
  \par
  \textbf{Format} type of file ('Image'|'Gravic'|'Report')
  \par
  \textbf{Type} type of file ('tif'|'pdf'|'xml'|'txt')
  \par
  \textbf{System} name of system ('Signin'|'Barcode')
  \par
  \textbf{Key} primary, system-dependent foreign key; Signin:[ClassReport].[cpId]
  \par
  \textbf{Index} secondary, system-dependent foreign key; Signin:[ClsStudent].[clId]
  \par
  \\
  RETURNS (XML AUTO)
  \par
  \textbf{Format} type of file ('Image'|'Gravic'|'Report')
  \par
  \textbf{fiType} type of file ('tif'|'pdf'|'xml'|'txt')
  \par
  \textbf{fiPath} relative path to file from \textit{DATAOUT}/\textit{MARKET}
  \par
  \textbf{fiReprocessed} the number of times the image has been reprocessed
  \par
  \\
  NOTE
  \par
  Here \textit{DATAOUT} is the data output path specified in \textit{scan.conf}.
  \par
  Here \textit{MARKET} is the name of the current market, enuerated in \textit{scan.conf}.
  \par
  \\
EXAMPLE:
\begin{algorithmic}
  \Function{yy\_scan\_GetFile}{@Format='Image', @Type='tif', @System='Signin', @Key=96153, @Index=172709}
  \EndFunction{}
\end{algorithmic}

%-----------------------------------------------------------
\appendix
%-----------------------------------------------------------
\end{document}
